import Vue from "vue";
import App from "./App.vue";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import router from "./router/index";
import { server } from "./api/index";
import store from "./store/index.js";
import { bankCardAttribution } from "./assets/js/bankCardAttribution.js";
import { resEncryption, resDecryption } from "./api/addpass.js";
import {copyText} from './api/validate.js'
Vue.prototype.$copyText = copyText  

import moment from 'moment';
import * as echarts from "echarts";
import VueAMap from "vue-amap";
import { VueJsonp } from 'vue-jsonp' //一定要加个花括号{VueJsonp },不然会报错
Vue.use(VueJsonp)
Vue.use(VueAMap);
//定义全局变量
Vue.prototype.$api = server;
Vue.prototype.$moment = moment;
Vue.prototype.$bankCardAttribution = bankCardAttribution;
Vue.use(ElementUI);
Vue.config.productionTip = false;
Vue.prototype.$encrypt = resEncryption; //加密
Vue.prototype.$decrypt = resDecryption; //解密
Vue.prototype.$echarts = echarts;
Vue.prototype.jsonp = VueJsonp;
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
